package com.hzx.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hzx.dao.UserDao;
import com.hzx.entity.User;
import com.hzx.service.UserService;

@Service
@Transactional // 事物注解
public class UserServiceImpl implements UserService {

	// 注入dao
	@Autowired
	private UserDao userDao;

	public User login(String userName, String password) {
		return userDao.login(userName, password);
	}

	@Override
	public void update(User user) {
		userDao.update(user);
		
	}
}
